package com.wx.app.card.config;

import com.wx.app.card.utils.ResultUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 类功能描述：
 *
 * @author：刘富国
 * @createTime：2019/7/30 20:01
 */
@Slf4j
@RestControllerAdvice
public class MyExceptionHandler {


    @ExceptionHandler(Exception.class)
    public Object exceptionHandler(Exception e) {
        log.error(e.getMessage(), e);
        return ResultUtils.fail(e.getMessage());
    }

}
